-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KCL stdlib and circle function #1029
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
5e0383c
to
f806dfd
Compare
f806dfd
to
3d6fad9
Compare
0c385ca
to
a91e24e
Compare
a91e24e
to
fe4ab62
Compare
3af8780
to
312ee46
Compare
7fd193a
to
1b0ea3b
Compare
} | ||
|
||
fn std_lib_fn(&self) -> crate::std::StdFn { | ||
todo!() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jessfraz this is bad but I don't know what to do here. How is this method actually used for the docs?
1b0ea3b
to
c7604dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is mostly beyond me, so don't have much input.
Allows stdlib functions to be written as KCL, not as Rust. Rust stdlib functions will hereafter be referred to as "core" not "std".
kcl-stdlib.mp4
Right now the only stdlib function I implemented is a circle function (it's a wrapper around the core
arc
function which sets the arc's start/end to 0 and 360 respectively). I know I want to change this function as soon as KCL has enums, which is my next task. So, I don't want users to start using this right away. To that end, I've named this function "unstable_stdlib_circle" not "circle". Once the function is ready to be stabilized, I can rename it to just "circle".Note that this PR modifies the existing "sketch and extrude a cylinder" KCL test so that instead of using a user-defined circle function, it uses the
unstable_stdlib_circle
function now. And the twenty-twenty tests pass, so we know my stdlib is working 🎉Fixes #922